<template>
  <course-student v-if="i===0"></course-student>
  <course-teacher v-else></course-teacher>
</template>

<script>
import CourseStudent from "@/views/Index/course/Course-student";
import CourseTeacher from "@/views/Index/course/Course-teacher";

export default {
    components: {CourseTeacher, CourseStudent},
    data(){
        return{
            "user":JSON.parse(localStorage.getItem("userinfo")),
            "i":null
        }
    },
    mounted(){
        let token=this.$util.parseToken(this.user.token)
        this.i=parseInt(token.userType);
    }
}
</script>

<style>

</style>
